package com.portal.backend.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.portal.backend.payload.ArticleRequest;
import com.portal.backend.payload.ArticleResponse;

public interface ArticleService {
    ArticleResponse createArticle(ArticleRequest articleRequest);
    ArticleResponse getArticleById(Long id);
    IPage<ArticleResponse> getAllArticles(long current, long size);
    IPage<ArticleResponse> getArticlesByAuthor(Long userId, long current, long size);
    ArticleResponse updateArticle(Long id, ArticleRequest articleRequest);
    void deleteArticle(Long id);
    void likeArticle(Long id);
    boolean toggleLike(Long articleId, Long userId);
    boolean hasLiked(Long articleId, Long userId);
    java.util.List<com.portal.backend.payload.UserSummary> getLikeUsers(Long articleId);
    // We might need a method to convert Article entity to ArticleResponse
} 